{
Author:  Prof1983 prof1983@yandex.ru
Created: 18.03.2009
LastMod: 20.03.2009
}
unit TraviesadoraCore;

interface

uses
  ABase, ABaseIntf, ChatDistributer, Jabber, NobraProtocoll, PrefController, RosterDB, RosterGlobals, Service;

const
  TraviesadoraCoreGuid: TGuid = '{C3B578EA-74F5-4636-85C9-42D88765B9D7}';

type
  ITraviesadoraCore = interface(IAModule)
    function GetChosenProfile: TJabberProfile;
    function GetJabber: TJabber;
    procedure SetOnlineState(Value: Integer);

    procedure AddContact(const JabberID, Nick: AString; AskSubscr: ABoolean);

    property ChosenProfile: TJabberProfile read GetChosenProfile;
    property Jabber: TJabber read GetJabber;
    property OnlineState: Integer write SetOnlineState;
  end;

type
  ITraviesadoraCoreA = interface(ITraviesadoraCore)
    function GetChosenProfileName: AString;
    function GetConfig: TConfigFile;
    function GetCryptPW: string;
    function GetNobraNet: TNobraNet;
    function GetPrefs: TPrefController;
    function GetRosterDB: TRosterDB;
    procedure SetChosenProfileName(const Value: AString);
    procedure SetCryptPW(const Value: string);

    procedure DeleteKeyLibRecords(const Extra, PartnerID: AString);
    function RefreshProfile: ABoolean;
    procedure SelectProfile(ProfileName: AString);
    function StartNewChatDistri(const ID, Resource, Nick: AString; NetType: TNetType): TChatDistri;
    procedure StopCryptLayer(NetWork: TNetType);

    property ChosenProfileName: AString read GetChosenProfileName write SetChosenProfileName;
    property Config: TConfigFile read GetConfig;
    property CryptPW: string read GetCryptPW write SetCryptPW;
    property NobraNet: TNobraNet read GetNobraNet;
    property Prefs: TPrefController read GetPrefs;
    property RosterDB: TRosterDB read GetRosterDB;
  end;

implementation

end.
 